With widespread use of local area networks (LANs) in general homes, an electronic device such as a printer has been shared among a plurality of computers through a LAN.
In general, LANs in homes comprise Ethernets (registered trademark) and wireless LANs, and use TCP/IP (Transmission Control Protocol/Internet Protocol).
According to TCP/IP, communication is performed with each device being specified by an IP address. However, some knowledge about networks is required for address assignment, which is difficult for a user who has no such knowledge to perform.
For this reason, in general homes, a router which connects a LAN to the Internet generally has a DHCP (Dynamic Host Configuration Protocol) server function. With this function, IP addresses are automatically assigned to connected devices. The DHCP server dynamically assigns IP addresses, and hence a connected device is not always assigned the same address every time it is activated.
When an electronic device such as a printer is to be used from a computer as a host device, the computer stores the IP address of the electronic device, and performs communication by transmitting data to the IP address. At this time, if an address different from the IP address stored in the computer is assigned to the electronic device, the computer cannot recognize any destination of communication with the electronic device, and hence cannot perform communication.
In order to solve this problem, there is provided a method in which if the computer cannot perform communication to the IP address of the electronic device which is stored in the computer, a communication destination is detected by a broadcasting or multicasting technique of transmitting packets to unspecified devices. In this method, the computer stores a variable value called the IP address of a given device and a value unique to the device such as a MAC address in advance, and broadcasts inquiries about IP addresses. Upon receiving this inquiry, the device returns a response containing the unique value (MAC address). Upon receiving the response, the device compares the stored unique value with the unique value contained in the response to check whether the device which has returned the response is a communication destination. In addition, containing the IP address in the response makes it possible to check the IP address of the communication destination.
The followings are examples of automatically recognizing a peripheral apparatus such as a printer connected to a network under an environment where a DHCP server dynamically assigns IP addresses.
An example of acquiring printer information by using a service location protocol (SLP) is disclosed in, for example, Japanese Patent Laid-Open No. 2000-033755.
An example of making a printer and server connected to a network function as DHCP servers is disclosed in, for example, Japanese Patent Laid-Open No. 2002-007091.
An example of recognizing a change in the combination of an IP address and a MAC address is disclosed in, for example, Japanese Patent Laid-Open No. 2004-048462.
Recently, with increasing awareness of security, firewall software has been widely used in home computers. A firewall is designed to prevent unauthorized external access and unauthorized connection to a host by monitoring network communication performed by a computer and limiting communication.
Broadcasting or multicasting is performed with respect to unspecified hosts. Therefore, depending on the settings of firewall software, communication by a computer using broadcasting or multicasting may be limited. More specifically, for example, a response to a request broadcast by an application may be blocked by a firewall and cannot reach the application.
In such situation, an electronic device assigned an address different from a previously assigned address by a DHCP server cannot be detected by broadcasting/multicasting.
In addition, firewall software exists in various forms, e.g., software included as a standard accessory in an operating system and software available from a third party, and no method exists which can know the settings of the software from another application. Even if, therefore, a firewall is set to inhibit the use of broadcasting/multicasting, no application can know the setting. That is, when a given device cannot receive a response to a broadcast or multicast request, the device cannot discriminate whether a response could not be received because a remote device is not powered on or because it is blocked by firewall.